import {createAction, props} from '@ngrx/store';

import * as TYPES from '../types/player.types';

import {Song} from '../../data-types/common.types';
import {PlayMode} from '../../data-types/store/player-reducer.interface';

export const SetPlaying = createAction(TYPES.SET_PLAYING, props<{ playing: boolean }>());

export const SetPlayList = createAction(TYPES.SET_PLAY_LIST, props<{ playList: Array<Song> }>());

export const SetSongList = createAction(TYPES.SET_SONG_LIST, props<{ songList: Array<Song> }>());

export const SetPlayMode = createAction(TYPES.SET_PLAY_MODE, props<{ playMode: PlayMode }>());

export const SetCurrentIndex = createAction(TYPES.SET_CURRENT_INDEX, props<{ currentIndex: number }>());
